package com.sz.mes.entity;

import java.util.Date;
import java.lang.Double;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.sz.mes.entity.BaseCustomEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.util.D;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 入库 Entity定义
 * @author hem
 * @version 1.0
 * @date 2023-05-25
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("instock")
public class Instock extends BaseCustomEntity {

    private static final long serialVersionUID = 7062322905001201438L;

    /**
     * receipt_type字段的关联字典
     */
    public static final String DICT_RECEIPT_TYPE = "RECEIPT_TYPE";

    /**
     * 入库单号
     */
    @Length(max = 100, message = "入库单号长度应小于100")
    @TableField()
    private String acceptanceNum;

    /**
     * 计划号
     */
    @Length(max = 100, message = "计划号长度应小于100")
    @TableField()
    private String planNum;

    /**
     * 任务单号
     */
    @Length(max = 100, message = "任务单号长度应小于100")
    @TableField()
    private String taskNum;

    /**
     * 单据编号
     */
    @Length(max = 100, message = "单据编号长度应小于100")
    @TableField()
    private String receiptNum;

    /**
     * 来源单据号
     */
    @Length(max = 100, message = "来源单据号长度应小于100")
    @TableField()
    private String sourceNum;

    /**
     * 来源单据行号
     */
    @Length(max = 100, message = "来源单据行号长度应小于100")
    @TableField()
    private String sourceNumRow;

    /**
     * 商品id
     */
    @TableField()
    private Long goodsId;

    /**
     * 商品名称
     */
    @Length(max = 100, message = "商品名称长度应小于100")
    @TableField()
    private String goodsName;

    /**
     * 入库数量
     */
    @TableField()
    private Integer quantity;

    /**
     * 备注
     */
    @Length(max = 100, message = "备注长度应小于100")
    @TableField()
    private String remarks;

    /**
     * 入库类型
     */
    @Length(max = 100, message = "入库类型长度应小于100")
    @TableField()
    private String receiptType;

    /**
     * 撤销类型
     */
    @Length(max = 100, message = "撤销类型长度应小于100")
    @TableField()
    private String cancelType;

    /**
     * 累计完工数量
     */
    @TableField()
    private Integer endQuantity;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 商品规格
     */
    @Length(max = 100, message = "商品规格长度应小于100")
    @TableField()
    private String specifications;

    /**
     * 库位
     */
    @Length(max = 100, message = "库位长度应小于100")
    @TableField()
    private String label;

    /**
     * 商品编码
     */
    @Length(max = 100, message = "商品编码长度应小于100")
    @TableField()
    private String goodsCode;

    /**
     * 库位商品数量
     */
    @Length(max = 100, message = "库位商品数量长度应小于100")
    @TableField()
    private String latticeQuantity;

    /**
     * 创建人
     */
    @Length(max = 100, message = "创建人长度应小于100")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 更新人
     */
    @Length(max = 100, message = "更新人长度应小于100")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 入库时间
     */
    @JsonFormat(pattern = D.FORMAT_DATE_Y4MD)
    @TableField()
    private Date instockTime;

    /**
     * 报废数量
     */
    @TableField()
    private Integer scrapQuantity;

    /**
     * 待返工数量
     */
    @TableField()
    private Integer reworkQuantity;

    /**
     * 行号
     */
    @Length(max = 100, message = "行号长度应小于100")
    @TableField()
    private String receiptNumRow;

    /**
     * 业务类型
     */
    @Length(max = 100, message = "业务类型长度应小于100")
    @TableField()
    private String businessType;

    /**
     * 杂收单位
     */
    @Length(max = 100, message = "杂收单位长度应小于100")
    @TableField()
    private String unit;
}
